from django.db import models
from django.utils import timezone
from django.contrib.auth.models import AbstractUser

import uuid
# 导入信号
from django.db.models.signals import pre_delete
from django.dispatch.dispatcher import receiver


# Create your models here.


class UserInfoModel(AbstractUser):
    """
    用户信息表格
    通过微信注册
    """
    wechat = models.CharField(max_length=30, null=False, blank=False, verbose_name="微信账号", help_text="微信账号")
    phone = models.CharField(max_length=11, null=False, blank=False, verbose_name="电话号码", help_text="电话号码")
    password = models.CharField(max_length=250, null=False, blank=False, verbose_name="用户密码", help_text="用户密码")
    created_time = models.CharField(max_length=25, null=True, blank=True, verbose_name="创建时间",
                                    help_text="创建时间")

    class Meta:
        verbose_name = '用户信息表格'
        verbose_name_plural = verbose_name

    def __str__(self):
        return str(self.id)
